package cn.anquing.service.Impl;


import cn.anquing.mapper.CityMapper;
import cn.anquing.model.City;
import cn.anquing.service.CityService;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/6/27 0027.
 */
@Service
public class CityServiceImpl extends ServiceImpl<CityMapper, City> implements CityService {

    @Autowired
    private CityMapper cityMapper;



    @Override
    public City selectById(int id) {
        return cityMapper.selectById(id);
    }

    @Override
    public Page<City> selectCityPage(Page<City> pageObj) {
        List<City> cityList = cityMapper.selectCityPage(pageObj);
        pageObj.setRecords(cityList);
        return pageObj;
    }


}
